Readme


#########################################
# Name: ReCaptcha - Erweiterung #
# Version: 1.0 #
# Ilch Version: 1.1 O #
# Autor: Tr3icio #
# Autorwebsite: http://tr3icio.de #
#########################################

Informationen:
**************
- Diese Erweiterung erlaubt es das ReCaptcha Plugin von Google in Ilch zu nutzen..

Fragen & Fehler:
****************
- Fragen und Fehler bitte auf http://tr3icio.de oder http://ilch.de melden

Support:
********
- Support erfolgt nur auf http://tr3icio.de und http://ilch.de

Nutzung:
********
- Die Nutzung dieses Moduls ist frei
- Copyrights dürfen nicht entfernt werden
- Der Download darf nirgendwo anders angeboten werden
- Die weitergabe dieses Moduls ohne die Erlaubnis des Autors ist strengstens verboten.

Haftungsausschluss:
*******************
- Ich übernehme keine Haftung für eventuelle Schäden und / oder Fehler welche durch die Installation und die Nutzung dieses, order jeglicher anderer Module von Mir, entstehen.
- Benutzung ausschließlich auf eigene Gefahr.

Installation

Achtung: Überschreibt folgende Datein:
  1. Inhalt des Ordners Upload in das Hauptverzeichnis eurer Installation packen.
  2. http://Deinedomain.de/(Mein Verzeichnis/)index.php?installation aufrufen
  3. Fertig!

Wie ReCaptcha nutzen?


Was ist wenn ihr nur für manche Sachen ReCaptcha wollt?

Optional: Manuelles ändern der include/includes/func/allg.php

  1. include/includes/func/allg.php
  2. Suche folgenden Code:

    # antispam
    function chk_antispam ($m, $nopictures = false) {
    global $allgAr;

    if ($nopictures) {
    return (bool) (isset($_POST['antispam_id']) and isset($_SESSION['antispam'][$_POST['antispam_id']]));
    }

    if (is_numeric($allgAr['antispam']) AND has_right($allgAr['antispam'])) {
    return true;
    }

    if (isset($_POST['antispam']) AND isset($_POST['antispam_id']) AND isset($_SESSION['antispam'][$_POST['antispam_id']]) AND $_POST['antispam'] == $_SESSION['antispam'][$_POST['antispam_id']][$m][3]) {
    unset ($_SESSION['antispam'][$_POST['antispam_id']]);
    return (true);
    }

    return (false);
    }

    function get_antispam ($m, $t, $nopictures = false) {
    global $allgAr, $antispamId;

    mt_srand((double)microtime()*1000000);
    $i1 = mt_rand (1,9);
    $i2 = mt_rand (1,9);
    $i3 = mt_rand (1,9);

    if (isset($antispamId)) {
    $id = $antispamId;
    } else {
    $id = $antispamId = uniqid($m, true);
    }

    $rs = '<input type="hidden" name="antispam_id" value="'.$id.'" />';

    if ($nopictures) {
    $_SESSION['antispam'][$id] = true;
    return $rs;
    }

    if (is_numeric($allgAr['antispam']) and has_right($allgAr['antispam'])) {
    return '';
    }

    if (!isset($_SESSION['antispam']) or (isset($_SESSION['antispam']) and !is_array($_SESSION['antispam']))) {
    $_SESSION['antispam'] = array();
    }

    $_SESSION['antispam'][$m] = array();
    $i1 = mt_rand (1,9);
    $i2 = mt_rand (1,9);
    $i3 = mt_rand (1,9);

    $_SESSION['antispam'][$id][$m] = array($i1, $i2, $i3, $i1.$i2.$i3);

    $rs .= '<span style="display: inline; width: 100px; vertical-align: middle; text-align: center; background-color: #000000; border: 0px; padding: 2px; margin: 0px;">'.
    '<img src="include/images/spam/z.php?m='.$m.'&amp;w=0&amp;'.session_name().'='.session_id().'&amp;id='.$id.'" alt="">'.
    '<img src="include/images/spam/z.php?m='.$m.'&amp;w=1&amp;'.session_name().'='.session_id().'&amp;id='.$id.'" alt="">'.
    '<img src="include/images/spam/z.php?m='.$m.'&amp;w=2&amp;'.session_name().'='.session_id().'&amp;id='.$id.'" alt="">'.
    '<input name="antispam" size="3" maxlength="3" style="background-color: #FFFFFF; border: 0px; margin: 0px; padding: 0px;" /></span>';
    if ($t == 0) {
    return ($rs);
    } elseif ($t == 1) {
    return ('<tr><td class="Cmite">Antispam</td><td class="Cnorm">'.$rs.'</td></tr>');
    } elseif ($t > 10) {
    return ('<label style="float:left; width: '.$t.'px; ">Antispam</label>'.$rs.'<br />');
    } else {
    return ('');
    }
    }
    # antispam


  3. Ersetze diesen durch:

    # antispam
    function chk_antispam ($m=false, $nopictures = false) {
    global $allgAr;

    require_once('include/includes/func/recaptchalib.php');

    if ( is_bool($_SESSION['recaptcha']) ) {

    $recaptcha = $_SESSION['recaptcha'];

    } else {

    $recaptcha = false;

    }

    if ( is_bool($_SESSION['allg_antispam']) ) {

    $allg_antispam = $_SESSION['allg_antispam'];

    } else {

    $allg_antispam = true;

    if ( is_bool($_SESSION['antispam_right']) ) {

    $allg_antispam = $_SESSION['antispam_right'];

    }

    }

    if ((is_numeric($allgAr['antispam']) and has_right($allgAr['antispam']) && $allg_antispam === true) || ( is_numeric( $allg_antispam ) && has_right($allg_antispam) ) ) {

    return true;

    }

    if ( ( $allgAr['recaptcha'] == 1 || $recaptcha === true ) && !empty($allgAr['recaptcha_public_key']) && !empty($allgAr['recaptcha_private_key']) ) {

    $privatekey = $allgAr['recaptcha_private_key'];
    $resp = recaptcha_check_answer ($privatekey,
    $_SERVER["REMOTE_ADDR"],
    $_POST["recaptcha_challenge_field"],
    $_POST["recaptcha_response_field"]);

    if (!$resp->is_valid) {

    return false;

    } else {

    return true;

    }

    } else {

    if ($nopictures) {
    return (bool) (isset($_POST['antispam_id']) and isset($_SESSION['antispam'][$_POST['antispam_id']]));
    }

    if (is_numeric($allgAr['antispam']) AND has_right($allgAr['antispam'])) {
    return true;
    }

    if (isset($_POST['antispam']) AND isset($_POST['antispam_id']) AND isset($_SESSION['antispam'][$_POST['antispam_id']]) AND $_POST['antispam'] == $_SESSION['antispam'][$_POST['antispam_id']][$m][3]) {
    unset ($_SESSION['antispam'][$_POST['antispam_id']]);
    return (true);
    }

    return (false);

    }

    }

    function get_antispam ($m=false, $t=false, $nopictures = false, $recaptcha = true, $allg_antispam = true) {

    global $allgAr, $antispamId;

    require_once('include/includes/func/recaptchalib.php');

    $_SESSION['allg_antispam'] = ( is_bool($allg_antispam) ? $allg_antispam : true );

    if ( is_numeric( $allg_antispam ) ) {

    $_SESSION['antispam_right'] = $allg_antispam;

    }


    $_SESSION['recaptcha'] = ( is_bool($recaptcha) ? $recaptcha : false );

    if ( ( is_numeric($allgAr['antispam']) and has_right($allgAr['antispam']) && $allg_antispam === false ) || ( is_numeric( $allg_antispam ) && has_right($allg_antispam) ) ) {

    return '';

    }

    if ( ( $allgAr['recaptcha'] == 1 || $recaptcha === true ) && !empty($allgAr['recaptcha_public_key']) && !empty($allgAr['recaptcha_private_key']) ) {

    $publickey = $allgAr['recaptcha_public_key']; // you got this from the signup page

    $_SESSION['recaptcha'] = true;

    $field = recaptcha_get_html($publickey);

    if ($t == 0) {

    return $field;

    } elseif ($t == 1) {

    return ('<tr><td class="Cmite">Antispam</td><td class="Cnorm">'.$field.'</td></tr>');

    } elseif ($t > 10) {

    return ('<label style="float:left; width: '.$t.'px; ">Antispam</label>'.$field.'<br />');

    } else {

    return ('');

    }


    } else {

    mt_srand((double)microtime()*1000000);
    $i1 = mt_rand (1,9);
    $i2 = mt_rand (1,9);
    $i3 = mt_rand (1,9);

    if (isset($antispamId)) {
    $id = $antispamId;
    } else {
    $id = $antispamId = uniqid($m, true);
    }

    $rs = '<input type="hidden" name="antispam_id" value="'.$id.'" />';

    if ($nopictures) {
    $_SESSION['antispam'][$id] = true;
    return $rs;
    }

    if (is_numeric($allgAr['antispam']) and has_right($allgAr['antispam'])) {
    return '';
    }

    if (!isset($_SESSION['antispam']) or (isset($_SESSION['antispam']) and !is_array($_SESSION['antispam']))) {
    $_SESSION['antispam'] = array();
    }

    $_SESSION['antispam'][$m] = array();
    $i1 = mt_rand (1,9);
    $i2 = mt_rand (1,9);
    $i3 = mt_rand (1,9);

    $_SESSION['antispam'][$id][$m] = array($i1, $i2, $i3, $i1.$i2.$i3);

    $rs .= '<span style="display: inline; width: 100px; vertical-align: middle; text-align: center; background-color: #000000; border: 0px; padding: 2px; margin: 0px;">'.
    '<img src="include/images/spam/z.php?m='.$m.'&amp;w=0&amp;'.session_name().'='.session_id().'&amp;id='.$id.'" alt="">'.
    '<img src="include/images/spam/z.php?m='.$m.'&amp;w=1&amp;'.session_name().'='.session_id().'&amp;id='.$id.'" alt="">'.
    '<img src="include/images/spam/z.php?m='.$m.'&amp;w=2&amp;'.session_name().'='.session_id().'&amp;id='.$id.'" alt="">'.
    '<input name="antispam" size="3" maxlength="3" style="background-color: #FFFFFF; border: 0px; margin: 0px; padding: 0px;" /></span>';

    if ($t == 0) {
    return ($rs);
    } elseif ($t == 1) {
    return ('<tr><td class="Cmite">Antispam</td><td class="Cnorm">'.$rs.'</td></tr>');
    } elseif ($t > 10) {
    return ('<label style="float:left; width: '.$t.'px; ">Antispam</label>'.$rs.'<br />');
    } else {
    return ('');
    }

    }

    }
    # antispam



Achtung: Kein Support solange Readme nicht gelesen und befolgt wurde!